﻿
namespace WFBot.Data.Repository
{
    using Framework.Repositories;
    using Framework.Domain;

    using System;
    using System.Linq;

    public class QuestionRepository : RepositoryBase<Question>, IQuestionRepository
    {
        public QuestionRepository(IDatabaseFactory databaseFactory)
            : base(databaseFactory)
        {
        }

        public Question GetByText(string text)
        {
            return Database.Questions.SingleOrDefault(q => q.Text == text);
        }
    }
}
